cd /usr/local/tomcat/bin
./shutdown.sh

cd /usr/local/tomcat/logs
rm -f *
cd /usr/local/tomcat/work/Catalina
rm -rf localhost

cp /root/.hudson/jobs/FinanceSystemBuild/workspace/financesystem/target/financesystem-0.1.war /usr/local/tomcat/webapps
mv /usr/local/tomcat/webapps/financesystem-0.1.war /usr/local/tomcat/webapps/financesystem.war 

cd /usr/local/tomcat/bin
./startup.sh